<?php 
if($this->Admin_model->check_trung(array('ip'=>$this->input->ip_address()),'users')){ 
    $this->session->set_userdata('loidk',$this->input->ip_address().' - Ip already exists</br>');
    $t=0;                
}else{
    $t=1;
}
if(validation_errors()|$this->session->userdata('loidn')){       
   echo ' 
     <ul data-role="listview" data-inset="true">    
            <li data-role="list-divider">Messenger<span class="ui-li-count">1</span></li>
            <li><a href="'.base_url().'user/register">        
                <p>'.form_error('username').'</p> 
                <p>'.form_error('password').'</p> 
                <p>'.$this->session->userdata('loidn').'</p>                
            </a></li>
        </ul>
     
     
     ';
     $this->session->unset_userdata('loidn');  
} 
if($t){
?>
 
<form method="post" action="<?=base_url();?>mobile/login" data-ajax="false" >      
      <input type="text" name="username" id="fname" placeholder="Username..."/>
      <input name="password" id="password" value="" autocomplete="off" type="password" placeholder="Password..."/>
      <input type="submit" data-inline="true" value="Submit"/>
</form>
<?}?>